package day3;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

/**
 * 输入某人生日，格式为"yyyy-MM-dd"，输出到现在为止经过了多少周。
 * @author Bonnie
 *
 */
public class Test03 {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输出你的生日，输出格式为:yyyy-MM-dd");
        String s = scanner.nextLine();
        Date date = new Date();
        Date birthday=sdf.parse(s);
        long haomiao=date.getTime()-birthday.getTime();
        long day=haomiao/1000/60/60/24;
        long week=day/7;
        System.out.println("week="+week);



    }
}
